<div class="page-title">
    <a class="pull-right btn btn-primary" href="<?= Yii::app()->createUrl('/admin/ingredients/create') ?>">
        <i class="glyphicon glyphicon-plus"></i> <?= Yii::t('app', 'Add user') ?>
    </a>
    <h1 class="page-header"><?= Yii::t('app', 'Users') ?></h1>
</div>

<?php
$this->widget('ReportButtons', array(
    'gridId' => 'users_grid',
    'pathToFiltersView' => 'application.views.reports.test_filter',
    'filterSelectors' => array('#test-filter'),

));

$this->widget('BGridView', array(
    'id'            => 'users_grid',
    'dataProvider'  => $model->search(),
    'filter'        => $model,
    'ajaxUpdate'    => 'users_grid',
    'pager'         => array(
        'class' => 'BPager',
    ),
    'columns' => array(
        array(
            'name'  => 'first_name',
            'value' => '$data->first_name',
        ),
        array(
            'name'  => 'rating.rating',
            'value' => '$data->rating["rating"]',
        ),
        array(
            'name'  => 'last_name',
            'value' => '$data->last_name',
        ),
        array(
            'name'  => 'email',
            'value' => '$data->email',
        ),
        array(
            'name'  => 'phone',
            'value' => '$data->phone',
        ),
        array(
            'class'    => 'BButtonColumn',
            'template' => '{update} {delete}',
        ),
    ),
));
